package com.turing.post.datatranfer.impl;

import java.util.List;

import javax.ejb.Local;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import com.turing.post.datatranfer.util.OldSaleBranchDao;
/**
 * 卡控制接口实现
 * @author WZD
 *
 */
@Stateless(mappedName = "datatranfer.impl.OldSaleBanchDaoImpl")
@Remote
@Local
public class OldSaleBanchDaoImpl implements OldSaleBranchDao {
	/**
	 * 实体管理器
	 */
	@PersistenceContext
	protected EntityManager _em;
	
	@SuppressWarnings("unchecked")
	@Override
	public List<Object[]> getOldSaleBranchList() {
		String sql = "select t.customid,t.customname,t.telephone,t.address,t.remark from custom t order by t.customid asc ";
		Query query = _em.createNativeQuery(sql);
		List<Object[]> obj_list = query.getResultList();
		return obj_list;
	}

	
}
